<!DOCTYPE html>
<html>
<head>
<title>ha_watchapi</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */

/* RESET
=============================================================================*/

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
}

/* BODY
=============================================================================*/

body {
  font-family: Helvetica, arial, freesans, clean, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  padding: 20px;
  max-width: 960px;
  margin: 0 auto;
}

body>*:first-child {
  margin-top: 0 !important;
}

body>*:last-child {
  margin-bottom: 0 !important;
}

/* BLOCKS
=============================================================================*/

p, blockquote, ul, ol, dl, table, pre {
  margin: 15px 0;
}

/* HEADERS
=============================================================================*/

h1, h2, h3, h4, h5, h6 {
  margin: 20px 0 10px;
  padding: 0;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
}

h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
  font-size: inherit;
}

h1 {
  font-size: 28px;
  color: #000;
}

h2 {
  font-size: 24px;
  border-bottom: 1px solid #ccc;
  color: #000;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

h5 {
  font-size: 14px;
}

h6 {
  color: #777;
  font-size: 14px;
}

body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
  margin-top: 0;
  padding-top: 0;
}

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
  margin-top: 0;
  padding-top: 0;
}

h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
  margin-top: 10px;
}

/* LINKS
=============================================================================*/

a {
  color: #4183C4;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* LISTS
=============================================================================*/

ul, ol {
  padding-left: 30px;
}

ul li > :first-child, 
ol li > :first-child, 
ul li ul:first-of-type, 
ol li ol:first-of-type, 
ul li ol:first-of-type, 
ol li ul:first-of-type {
  margin-top: 0px;
}

ul ul, ul ol, ol ol, ol ul {
  margin-bottom: 0;
}

dl {
  padding: 0;
}

dl dt {
  font-size: 14px;
  font-weight: bold;
  font-style: italic;
  padding: 0;
  margin: 15px 0 5px;
}

dl dt:first-child {
  padding: 0;
}

dl dt>:first-child {
  margin-top: 0px;
}

dl dt>:last-child {
  margin-bottom: 0px;
}

dl dd {
  margin: 0 0 15px;
  padding: 0 15px;
}

dl dd>:first-child {
  margin-top: 0px;
}

dl dd>:last-child {
  margin-bottom: 0px;
}

/* CODE
=============================================================================*/

pre, code, tt {
  font-size: 12px;
  font-family: Consolas, "Liberation Mono", Courier, monospace;
}

code, tt {
  margin: 0 0px;
  padding: 0px 0px;
  white-space: nowrap;
  border: 1px solid #eaeaea;
  background-color: #f8f8f8;
  border-radius: 3px;
}

pre>code {
  margin: 0;
  padding: 0;
  white-space: pre;
  border: none;
  background: transparent;
}

pre {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  font-size: 13px;
  line-height: 19px;
  overflow: auto;
  padding: 6px 10px;
  border-radius: 3px;
}

pre code, pre tt {
  background-color: transparent;
  border: none;
}

kbd {
    -moz-border-bottom-colors: none;
    -moz-border-left-colors: none;
    -moz-border-right-colors: none;
    -moz-border-top-colors: none;
    background-color: #DDDDDD;
    background-image: linear-gradient(#F1F1F1, #DDDDDD);
    background-repeat: repeat-x;
    border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
    border-image: none;
    border-radius: 2px 2px 2px 2px;
    border-style: solid;
    border-width: 1px;
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    line-height: 10px;
    padding: 1px 4px;
}

/* QUOTES
=============================================================================*/

blockquote {
  border-left: 4px solid #DDD;
  padding: 0 15px;
  color: #777;
}

blockquote>:first-child {
  margin-top: 0px;
}

blockquote>:last-child {
  margin-bottom: 0px;
}

/* HORIZONTAL RULES
=============================================================================*/

hr {
  clear: both;
  margin: 15px 0;
  height: 0px;
  overflow: hidden;
  border: none;
  background: transparent;
  border-bottom: 4px solid #ddd;
  padding: 0;
}

/* TABLES
=============================================================================*/

table th {
  font-weight: bold;
}

table th, table td {
  border: 1px solid #ccc;
  padding: 6px 13px;
}

table tr {
  border-top: 1px solid #ccc;
  background-color: #fff;
}

table tr:nth-child(2n) {
  background-color: #f8f8f8;
}

/* IMAGES
=============================================================================*/

img {
  max-width: 100%
}
</style>
<style type="text/css">
.highlight  { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
.pl-c {
    color: #969896;
}

.pl-c1,.pl-mdh,.pl-mm,.pl-mp,.pl-mr,.pl-s1 .pl-v,.pl-s3,.pl-sc,.pl-sv {
    color: #0086b3;
}

.pl-e,.pl-en {
    color: #795da3;
}

.pl-s1 .pl-s2,.pl-smi,.pl-smp,.pl-stj,.pl-vo,.pl-vpf {
    color: #333;
}

.pl-ent {
    color: #63a35c;
}

.pl-k,.pl-s,.pl-st {
    color: #a71d5d;
}

.pl-pds,.pl-s1,.pl-s1 .pl-pse .pl-s2,.pl-sr,.pl-sr .pl-cce,.pl-sr .pl-sra,.pl-sr .pl-sre,.pl-src,.pl-v {
    color: #df5000;
}

.pl-id {
    color: #b52a1d;
}

.pl-ii {
    background-color: #b52a1d;
    color: #f8f8f8;
}

.pl-sr .pl-cce {
    color: #63a35c;
    font-weight: bold;
}

.pl-ml {
    color: #693a17;
}

.pl-mh,.pl-mh .pl-en,.pl-ms {
    color: #1d3e81;
    font-weight: bold;
}

.pl-mq {
    color: #008080;
}

.pl-mi {
    color: #333;
    font-style: italic;
}

.pl-mb {
    color: #333;
    font-weight: bold;
}

.pl-md,.pl-mdhf {
    background-color: #ffecec;
    color: #bd2c00;
}

.pl-mdht,.pl-mi1 {
    background-color: #eaffea;
    color: #55a532;
}

.pl-mdr {
    color: #795da3;
    font-weight: bold;
}

.pl-mo {
    color: #1d3e81;
}
.task-list {
padding-left:10px;
margin-bottom:0;
}

.task-list li {
    margin-left: 20px;
}

.task-list-item {
list-style-type:none;
padding-left:10px;
}

.task-list-item label {
font-weight:400;
}

.task-list-item.enabled label {
cursor:pointer;
}

.task-list-item+.task-list-item {
margin-top:3px;
}

.task-list-item-checkbox {
display:inline-block;
margin-left:-20px;
margin-right:3px;
vertical-align:1px;
}
</style>
</head>
<body>
<h1 id="-api-">手表api服务</h1>
<ul>
<li>接口功能介绍<br>血压手表rest api</li><li>服务协议<br>HTTP/GET</li><li>URL<br>  <a href="http://lib.huayinghealth.com/lib-x/?service=haWatch">http://lib.huayinghealth.com/lib-x/?service=haWatch</a>.</li><li><p>编码格式<br>如无特殊声明,所有接口的输入参数和输出数据编码全部统一为utf-8</p>
</li><li><p>所有接口都带有sign参数,生成规则是所有参数名称按字典排序md5加密,32位小写字符串.</p>
</li><li>service=xx.oo参数包含在内,sign参数不包含</li><li>举例: 参数service=xxx&amp;upmode=10&amp;imei=13123123 参数名称升序排序 imei &lt;service&lt; upmode.   拼接内容为字符串str=13123123xxx10. 然后计算str的md5,32位小写  </li></ul>
<h2 id="1-">1.获取最新的一次定位信息</h2>
<h2 id="-service-hawatch-get_lastest_location-"><code>?service=haWatch.get_lastest_location</code></h2>
<h3 id="1-1-">1.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>查询的手表imei,为15位数字</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>参数签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="1-2-">1.2 实例说明</h3>
<ul>
<li><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.get_lastest_location&amp;imei=358688000000158&amp;sign=161f58141c659d9f97fbfd2d948efaa3">http://lib.huayinghealth.com/lib-x/?service=haWatch.get_lastest_location&amp;imei=358688000000158&amp;sign=161f58141c659d9f97fbfd2d948efaa3</a></li></ul>
<h3 id="1-3-">1.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:[{&quot;watch_time&quot;:&quot;2016-08-24 16:47:30&quot;,&quot;location_lon&quot;:&quot;113.9749712&quot;,&quot;location_lat&quot;:&quot;22.5617714&quot;,&quot;location_type&quot;:&quot;1&quot;,&quot;location_content&quot;:&quot;广东省 深圳市 南山区 龙珠四路 靠近金谷创业园&quot;,&quot;battery&quot;:&quot;100&quot;}],&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret   200:解析正常; 其他:异常或错误</li><li>data  查询结果</li><li>code  0:有查询结果;1:无查询结果</li><li>message:查询内容</li><li>watch_time 手表定位时间</li><li>locaton_lon 经度</li><li>location_lat 纬度</li><li>location_type 定位类型: 0:gps定位;1:wifi定位;2:基站定位</li><li>location_content 位置描述</li><li>battery 电量百分比</li></ul>
<h2 id="2-">2.获取某一天时间内的所有定位坐标</h2>
<h2 id="-service-hawatch-get_day_location-"><code>?service=haWatch.get_day_location</code></h2>
<h3 id="2-1-">2.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>查询的手表Imei,为15位数字</td>
<td>是</td>
</tr>
<tr>
<td>date</td>
<td>查询的日期,为2016-08-24 格式</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="2-2-">2.2 实例说明</h3>
<ul>
<li><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.get_day_location&amp;imei=358688000000158&amp;date=2016-08-24">http://lib.huayinghealth.com/lib-x/?service=haWatch.get_day_location&amp;imei=358688000000158&amp;date=2016-08-24</a></li></ul>
<h3 id="2-3-">2.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:[{&quot;location_lon&quot;:&quot;113.9749034&quot;,&quot;location_lat&quot;:&quot;22.5618319&quot;},{&quot;location_lon&quot;:&quot;113.9747439&quot;,&quot;location_lat&quot;:&quot;22.56185&quot;},{&quot;location_lon&quot;:&quot;113.9748009&quot;,&quot;location_lat&quot;:&quot;22.5614014&quot;},{&quot;location_lon&quot;:&quot;113.9746219&quot;,&quot;location_lat&quot;:&quot;22.5618438&quot;},{&quot;location_lon&quot;:&quot;113.9747534&quot;,&quot;location_lat&quot;:&quot;22.5614326&quot;},{&quot;location_lon&quot;:&quot;113.974975&quot;,&quot;location_lat&quot;:&quot;22.5617508&quot;},{&quot;location_lon&quot;:&quot;113.9747461&quot;,&quot;location_lat&quot;:&quot;22.5613574&quot;},{&quot;location_lon&quot;:&quot;113.9749314&quot;,&quot;location_lat&quot;:&quot;22.5616165&quot;},{&quot;location_lon&quot;:&quot;113.9747876&quot;,&quot;location_lat&quot;:&quot;22.561406&quot;},{&quot;location_lon&quot;:&quot;113.9747662&quot;,&quot;location_lat&quot;:&quot;22.5613498&quot;},{&quot;location_lon&quot;:&quot;113.9747396&quot;,&quot;location_lat&quot;:&quot;22.5618226&quot;},{&quot;location_lon&quot;:&quot;113.9748164&quot;,&quot;location_lat&quot;:&quot;22.5617638&quot;},{&quot;location_lon&quot;:&quot;113.9749824&quot;,&quot;location_lat&quot;:&quot;22.5617573&quot;},{&quot;location_lon&quot;:&quot;113.9747575&quot;,&quot;location_lat&quot;:&quot;22.5613523&quot;},{&quot;location_lon&quot;:&quot;113.9747312&quot;,&quot;location_lat&quot;:&quot;22.5613612&quot;},{&quot;location_lon&quot;:&quot;113.9747629&quot;,&quot;location_lat&quot;:&quot;22.561349&quot;},{&quot;location_lon&quot;:&quot;113.9749712&quot;,&quot;location_lat&quot;:&quot;22.5617714&quot;}],&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:查询有结果;1:查询无结果;2:日期参数错误</li><li>message 坐标数组</li><li>location_lon 经度</li><li>location_lat 纬度</li><li>2016-10-24 update 增加了返回定位类型参数 location_type</li><li>定位类型: 0:gps定位;1:wifi定位;2:基站定位</li></ul>
<h2 id="3-">3.获取手表在线状态</h2>
<h2 id="-service-hawatch-is_online-"><code>?service=haWatch.is_online</code></h2>
<h3 id="3-1-">3.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>查询的手表imei,为15位数字</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="3-2-">3.2实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.is_online&amp;imei=358688000000158">http://lib.huayinghealth.com/lib-x/?service=haWatch.is_online&amp;imei=358688000000158</a></p>
<h3 id="3-3-">3.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:1,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:查询有结果;1:查询无结果;</li><li>message 1:在线;0:不在线</li></ul>
<h2 id="4-1-10-1-">4.设置定位模式(1分钟,10分钟,1小时)</h2>
<h2 id="-service-hawatch-set_upload_mode-"><code>?service=haWatch.set_upload_mode</code></h2>
<h3 id="4-1-">4.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei,为15位数字</td>
<td>是</td>
</tr>
<tr>
<td>upmode</td>
<td>定位模式,为1,10,60 三种数字</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="4-2-">4.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.set_upload_mode&amp;imei=358688000000159&amp;upmode=10">http://lib.huayinghealth.com/lib-x/?service=haWatch.set_upload_mode&amp;imei=358688000000159&amp;upmode=10</a></p>
<ul>
<li>设为10分钟定位一次模式</li></ul>
<h3 id="4-3-">4.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="5-">5.监听</h2>
<h2 id="-service-hawatch-monitor-"><code>?service=haWatch.monitor</code></h2>
<h3 id="5-1-">5.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei,为15位数字</td>
<td>是</td>
</tr>
<tr>
<td>phonenumber</td>
<td>手表回拨的电话号码</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="5-2-">5.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.monitor&amp;imei=358688000000159&amp;phonenumber=13800001234">http://lib.huayinghealth.com/lib-x/?service=haWatch.monitor&amp;imei=358688000000159&amp;phonenumber=13800001234</a></p>
<h3 id="5-3-">5.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="6-sos-">6.设置sos号码</h2>
<h2 id="-service-hawatch-set_sos_number-"><code>?service=haWatch.set_sos_number</code></h2>
<h3 id="6-1-">6.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表Imei</td>
<td>是</td>
</tr>
<tr>
<td>sos</td>
<td>sos号码,最多三个,以,隔开.例子:123456,123456,123456</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="6-2-">6.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.set_sos_number&amp;imei=358688000000159&amp;sos=13800001234,123456,222365">http://lib.huayinghealth.com/lib-x/?service=haWatch.set_sos_number&amp;imei=358688000000159&amp;sos=13800001234,123456,222365</a></p>
<h3 id="6-3-">6.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="7-">7.恢复出厂设置</h2>
<h2 id="-service-hawatch-reset-"><code>?service=haWatch.reset</code></h2>
<h3 id="7-1-">7.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="7-2-">7.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.reset&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.reset&amp;imei=358688000000159</a></p>
<h3 id="7-3-">7.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="8-">8.重启手表</h2>
<h2 id="-service-hawatch-reboot-"><code>?service=haWatch.reboot</code></h2>
<h3 id="8-1-">8.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="8-2-">8.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.reboot&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.reboot&amp;imei=358688000000159</a></p>
<h3 id="8-3-">8.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="9-">9.请求定位</h2>
<h2 id="-service-hawatch-req_location-"><code>?service=haWatch.req_location</code></h2>
<h3 id="9-1-">9.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="9-2-">9.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.req_location&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.req_location&amp;imei=358688000000159</a></p>
<h3 id="9-3-">9.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="10-">10.关机</h2>
<h2 id="-service-hawatch-shutdown-"><code>?service=haWatch.shutdown</code></h2>
<h3 id="10-1-">10.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="10-2-">10.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.shutdown&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.shutdown&amp;imei=358688000000159</a></p>
<h3 id="10-3-">10.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="11-">11.找手表</h2>
<h2 id="-service-hawatch-find_dev-"><code>?service=haWatch.find_dev</code></h2>
<h3 id="11-1-">11.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="11-2-">11.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.find_dev&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.find_dev&amp;imei=358688000000159</a></p>
<h3 id="11-3-">11.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="12-">12.设置闹钟</h2>
<h2 id="-service-hawatch-set_alarm-"><code>?service=haWatch.set_alarm</code></h2>
<h3 id="12-1-">12.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>alarm</td>
<td>设置的闹钟,格式为08:10-1-1,08:10-1-2,08:10-1-3-0111110 多组闹钟之间用逗号隔开.<code>解释:08:10:闹钟时间为8点10分</code>;第二个1代表开启,0代表关闭.第三个数字1,2,3 代表三种类型,1:只闹一次;2:每天闹;3:自定义时间,后面0111110代表周一-周五闹,周日和周六不闹</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="12-2-">12.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.set_alarm&amp;imei=358688000000159&amp;alarm=08:00-1-1">http://lib.huayinghealth.com/lib-x/?service=haWatch.set_alarm&amp;imei=358688000000159&amp;alarm=08:00-1-1</a></p>
<h3 id="12-3-">12.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="13-">13.设置电话本(前五个)</h2>
<h2 id="-service-hawatch-set_contact_a-"><code>?service=haWatch.set_contact_a</code></h2>
<h3 id="13-1-">13.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>contacta</td>
<td>联系人,格式为 姓名1,电话1,姓名2,电话2,姓名3,电话3,姓名4,电话4,姓名5,电话5.姓名为fffe格式的unicode码,电话为数字</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="13-2-">13.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.set_contact_a&amp;imei=358688000000159&amp;contacta=8b730f5c,123,8b730f5c,125">http://lib.huayinghealth.com/lib-x/?service=haWatch.set_contact_a&amp;imei=358688000000159&amp;contacta=8b730f5c,123,8b730f5c,125</a></p>
<ul>
<li>8b730f5c 为中文 王小 unicode码 fffe格式的 每个字符占四位unicode</li></ul>
<h3 id="13-3-">13.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="14-">14.设置电话本(后五个)</h2>
<h2 id="-service-hawatch-set_contact_b-"><code>?service=haWatch.set_contact_b</code></h2>
<h3 id="14-1-">14.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>contactb</td>
<td>联系人,格式为 姓名1,电话1,姓名2,电话2,姓名3,电话3,姓名4,电话4,姓名5,电话5.姓名为fffe格式的unicode码,电话为数字</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="14-2-">14.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.set_contact_b&amp;imei=358688000000159&amp;contactb=8b730f5c,123,8b730f5c,125">http://lib.huayinghealth.com/lib-x/?service=haWatch.set_contact_b&amp;imei=358688000000159&amp;contactb=8b730f5c,123,8b730f5c,125</a></p>
<ul>
<li>8b730f5c 为中文 王小 unicode码 fffe格式的 每个字符占四位unicode</li></ul>
<h3 id="14-3-">14.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="15-">15.发送文本消息</h2>
<h2 id="-service-hawatch-send_msg-"><code>?service=haWatch.send_msg</code></h2>
<h3 id="15-1-">15.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>message</td>
<td>发送的消息,unicode码,每个字符占4位,例如:你好(604f7d59)</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="15-2-">15.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.send_msg&amp;imei=358688000000159&amp;message=604f7d59">http://lib.huayinghealth.com/lib-x/?service=haWatch.send_msg&amp;imei=358688000000159&amp;message=604f7d59</a></p>
<h3 id="15-3-">15.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="16-">16.增加小红花</h2>
<h2 id="-service-hawatch-add_honor-"><code>?service=haWatch.add_honor</code></h2>
<h3 id="16-1-">16.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="16-2-">16.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.add_honor&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.add_honor&amp;imei=358688000000159</a></p>
<ul>
<li>增加一朵小红花</li></ul>
<h3 id="16-3-">16.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="17-">17.清零小红花</h2>
<h2 id="-service-hawatch-clear_honor-"><code>?service=haWatch.clear_honor</code></h2>
<h3 id="17-1-">17.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="17-2-">17.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.clear_honor&amp;imei=358688000000159">http://lib.huayinghealth.com/lib-x/?service=haWatch.clear_honor&amp;imei=358688000000159</a></p>
<ul>
<li>清零小红花</li></ul>
<h3 id="17-3-">17.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="18-">18.设置免打扰时间</h2>
<h2 id="-service-hawatch-set_silence-"><code>?service=haWatch.set_silence</code></h2>
<h3 id="18-1-">18.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>silence</td>
<td>设置的免打扰时间段,多组之间用逗号隔开.例如:<code>21:10-07:30,09:00-12:00,14:00-16:00</code></td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="18-2-">18.2 实例说明</h3>
<pre><code>http://lib.huayinghealth.com/lib-x/?service=haWatch.set_silence&amp;imei=358688000000159&amp;silence=21:10-07:30,09:00-12:00,14:00-16:00
</code></pre><h3 id="18-3-">18.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误</li></ul>
<h2 id="19-">19.获取新微聊信息列表</h2>
<h2 id="-service-hawatch-get_new_message_list-"><code>?service=haWatch.get_new_message_list</code></h2>
<h3 id="19-1-">19.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>user_id</td>
<td>app帐号(注册的手机号)</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="19-2-">19.2 实例说明</h3>
<p>   <code>http://lib.huayinghealth.com/lib-x/?service=haWatch.get_new_message_list&amp;imei=123456789012345&amp;user_id=13112345678</code></p>
<h3 id="19-3-">19.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:[{&quot;file&quot;:&quot;123456789012345_1474532952.amr&quot;},{&quot;file&quot;:&quot;123456789012345_1474532953.amr&quot;},{&quot;file&quot;:&quot;123456789012345_1474532954.amr&quot;}],&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:有新消息;1:无新消息;2:参数错误</li><li>message:新消息文件名称filename</li></ul>
<h3 id="-">特别说明</h3>
<ul>
<li>语音文件位置:<code>http://core.huayinghealth.com/media/hawatch/filename</code></li><li>可直接下载,amr格式音频文件,新增jpg格式图片文件</li><li>关于离线消息,手表可发离线消息保存在服务器,app在连上网络时自行调用这个接口查询是否有新消息,有新消息就down下来</li><li>down一个文件filename后,需要调用接口</li><li><code>http://lib.huayinghealth.com/lib-x/?service=haWatch.ignore_message&amp;imei=123456789012345&amp;user_id=13112345678&amp;filename=123456789012345_1474527618.amr</code></li><li>参数同上,多一个filename参数即为down下来的音频文件名称.</li><li>返回值{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}</li><li>ret 200:解析正常</li><li>code 0:处理正常</li></ul>
<h2 id="20-">20.绑定手表</h2>
<h2 id="-service-hawatch-bind_watch-"><code>?service=haWatch.bind_watch</code></h2>
<h3 id="20-1-">20.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>user_id</td>
<td>app帐号(注册的手机号)</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="20-2-">20.2 实例说明</h3>
<pre><code>http://lib.huayinghealth.com/lib-x/?service=haWatch.bind_watch&amp;imei=987654321012345&amp;user_id=121212121
</code></pre><h3 id="20-3-">20.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:绑定成功;1:绑定错误或者已绑定;2:参数错误</li></ul>
<h2 id="21-">21.解绑手表</h2>
<h2 id="-service-hawatch-unbind_watch-"><code>?service=haWatch.unbind_watch</code></h2>
<h3 id="21-1-">21.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>user_id</td>
<td>app帐号(注册的手机号)</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="21-2-">21.2 实例说明</h3>
<pre><code>http://lib.huayinghealth.com/lib-x/?service=haWatch.unbind_watch&amp;imei=987654321012345&amp;user_id=121212121
</code></pre><h3 id="21-3-">21.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:解绑成功;1:错误或者本身没有绑定;2:参数错误   </li></ul>
<h2 id="22-">22.远程拍照</h2>
<h2 id="-service-hawatch-remote_photo-"><code>?service=haWatch.remote_photo</code></h2>
<h3 id="22-1-">22.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="22-2-">22.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=haWatch.remote_photo&amp;imei=123456789012345">http://lib.huayinghealth.com/lib-x/?service=haWatch.remote_photo&amp;imei=123456789012345</a></p>
<ul>
<li>控制手表拍照并发送到服务器</li></ul>
<h3 id="22-3-">22.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:设置成功;1:设备离线状态;2:参数错误   </li></ul>
<h2 id="23-">23.获取短信验证码</h2>
<h2 id="-service-hawatchaccount-get_vcode-"><code>?service=HaWatchAccount.get_vcode</code></h2>
<h3 id="23-1-">23.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="23-2-">23.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.get_vcode&amp;mobile=13012345678">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.get_vcode&amp;mobile=13012345678</a></p>
<ul>
<li>提交手机号,服务端生成验证码,发送到手机,等待验证</li></ul>
<h3 id="23-3-">23.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功;1:手机号已被注册过;2:当日短信发送数量已达上限;3:注册太频繁,一分钟后再试</li></ul>
<h2 id="24-">24.提交手机号和短信验证码验证</h2>
<h2 id="-service-hawatchaccount-verify_mobile-"><code>?service=HaWatchAccount.verify_mobile</code></h2>
<h3 id="24-1-">24.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>vcode</td>
<td>短信验证码</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="24-2-">24.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.verify_mobile&amp;mobile=13012345678&amp;vcode=899967">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.verify_mobile&amp;mobile=13012345678&amp;vcode=899967</a></p>
<ul>
<li>提交手机号和短信验证码验证</li></ul>
<h3 id="24-3-">24.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功;返回手机号和注册授权码;其他:验证失败</li></ul>
<h2 id="25-">25.注册帐号</h2>
<h2 id="-service-hawatchaccount-register-"><code>?service=HaWatchAccount.register</code></h2>
<h3 id="25-1-">25.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>vkey</td>
<td>注册授权码</td>
<td>是</td>
</tr>
<tr>
<td>password</td>
<td>密码,长度6-14位</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="25-2-">25.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.register&amp;mobile=13012345678&amp;vkey=966742c2161ff1632479cbcedf47f49f&amp;password=123456">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.register&amp;mobile=13012345678&amp;vkey=966742c2161ff1632479cbcedf47f49f&amp;password=123456</a></p>
<ul>
<li>注册新用户</li></ul>
<h3 id="25-3-">25.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功;其他:失败</li></ul>
<h2 id="26-">26.用户登录</h2>
<h2 id="-service-hawatchaccount-login-"><code>?service=HaWatchAccount.login</code></h2>
<h3 id="26-1-">26.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>password</td>
<td>密码,长度6-14位</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="26-2-">26.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.login&amp;mobile=13012345678&amp;password=123456">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.login&amp;mobile=13012345678&amp;password=123456</a></p>
<ul>
<li>用户登录</li></ul>
<h3 id="26-3-">26.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功,返回用户信息(昵称,用户名,性别,等等);2:登录失败;3:登录失败;9:帐号被锁定</li></ul>
<h2 id="27-">27.找回密码,获取短信验证码</h2>
<h2 id="-service-hawatchaccount-get_forgetpw_code-"><code>?service=HaWatchAccount.get_forgetpw_code</code></h2>
<h3 id="27-1-">27.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="27-2-">27.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.get_forgetpw_code&amp;mobile=13012345678">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.get_forgetpw_code&amp;mobile=13012345678</a></p>
<ul>
<li>用于找回密码时,获取短信验证码</li></ul>
<h3 id="27-3-">27.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功,发送短信验证码;3:没有此用户;1:稍后再尝试</li></ul>
<h2 id="28-">28.找回密码,验证短信验证码</h2>
<h2 id="-service-hawatchaccount-verify_forgetpw_code-"><code>?service=HaWatchAccount.verify_forgetpw_code</code></h2>
<h3 id="28-1-">28.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>vcode</td>
<td>短信验证码</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="28-2-">28.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.verify_forgetpw_code&amp;mobile=13012345678&amp;vcode=839174">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.verify_forgetpw_code&amp;mobile=13012345678&amp;vcode=839174</a></p>
<ul>
<li>用于找回密码时,验证短信验证码</li></ul>
<h3 id="28-3-">28.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功,返回授权码vkey,mobile 手机号;其他:失败</li></ul>
<h2 id="29-">29.找回密码,重置密码</h2>
<h2 id="-service-hawatchaccount-reset_forgetpw-"><code>?service=HaWatchAccount.reset_forgetpw</code></h2>
<h3 id="29-1-">29.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>mobile</td>
<td>手机号</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="29-2-">29.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.reset_forgetpw&amp;mobile=13012345678&amp;vkey=a4d4a5d0ad4efc1a636106dddae31711&amp;password=1234567">http://lib.huayinghealth.com/lib-x/?service=HaWatchAccount.reset_forgetpw&amp;mobile=13012345678&amp;vkey=a4d4a5d0ad4efc1a636106dddae31711&amp;password=1234567</a></p>
<ul>
<li>用于找回密码时,重置密码为1234567</li></ul>
<h3 id="29-3-">29.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功;1:失败</li></ul>
<h2 id="30-">30.获取健康数据(心率,血压,心电图)</h2>
<h2 id="-service-hawatch-get_health_data-"><code>?service=HaWatch.get_health_data</code></h2>
<h3 id="30-1-">30.1 参数说明</h3>
<table>
<thead>
<tr>
<th>参数名称</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>imei</td>
<td>手表imei</td>
<td>是</td>
</tr>
<tr>
<td>type</td>
<td>int型,数据类型,0:心率;1:血压,2:心电</td>
<td>是</td>
</tr>
<tr>
<td>list</td>
<td>int型,数据条数,0:最新的20条(1-20),1:第21-40条;2:依次类推.</td>
<td>是</td>
</tr>
<tr>
<td>sign</td>
<td>接口签名</td>
<td>是</td>
</tr>
</tbody>
</table>
<h3 id="30-2-">30.2 实例说明</h3>
<p><a href="http://lib.huayinghealth.com/lib-x/?service=HaWatch.get_health_data&amp;imei=352108010002300&amp;list=1&amp;type=0">http://lib.huayinghealth.com/lib-x/?service=HaWatch.get_health_data&amp;imei=352108010002300&amp;list=1&amp;type=0</a></p>
<ul>
<li>获取需要查询的健康数据</li></ul>
<h3 id="30-3-">30.3 返回值说明</h3>
<pre><code>{&quot;ret&quot;:200,&quot;data&quot;:{&quot;code&quot;:0,&quot;message&quot;:&quot;&quot;,&quot;info&quot;:&quot;&quot;},&quot;msg&quot;:&quot;&quot;}
</code></pre><ul>
<li>ret  200:解析正常;其他:异常或错误</li><li>data 解析结果</li><li>code 0:成功,返回相应的数据及时间;1:无数据</li></ul>

</body>
</html>
<!-- This document was created with MarkdownPad, the Markdown editor for Windows (http://markdownpad.com) -->
